<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../../../print.css" type="text/css" media="print">
<meta content="Vector3D,com.derschmale.wick3d.core.math.Vector3D,XAXIS,YAXIS,ZAXIS,w,x,y,z,length,lengthSquared,add,angleBetween,clone,crossProduct,decrementBy,distance,dotProduct,equals,incrementBy,multiplyMatrix,nearEquals,negate,normalize,project,scaleBy,subtract,toString" name="keywords">
<title>com.derschmale.wick3d.core.math.Vector3D</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'Vector3D - Wick3d Documentation';
				var baseRef = '../../../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">Wick3d Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../../../all-classes.html')" href="../../../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../../all-classes.html')" href="../../../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../../index-list.html')" href="../../../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../../../index.html?com/derschmale/wick3d/core/math/Vector3D.html&amp;com/derschmale/wick3d/core/math/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;Vector3D</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a>&nbsp;| <a href="#constantSummary">Constants</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class Vector3D"); titleBar_setSubNav(true,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">com.derschmale.wick3d.core.math</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class Vector3D</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Subclasses</td><td><a href="../geometry/Vertex3D.html">Vertex3D</a></td>
</tr>
</table>
<p></p>
  
  The Vector3D class represents a point or a direction in 3D space.
  
  <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#length">length</a> : Number<div class="summaryTableDescription">[read-only]
   The length of the vector, or the distance from a point to the origin.</div>
</td><td class="summaryTableOwnerCol">Vector3D</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#lengthSquared">lengthSquared</a> : Number<div class="summaryTableDescription">[read-only]
   The squared length of the vector, or the squared distance from a point to the origin.</div>
</td><td class="summaryTableOwnerCol">Vector3D</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#w">w</a> : Number<div class="summaryTableDescription">
   A number defining whether the vector is a direction vector (0) or a point (1).</div>
</td><td class="summaryTableOwnerCol">Vector3D</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#x">x</a> : Number<div class="summaryTableDescription">
   The x-coordinate of the vector
   </div>
</td><td class="summaryTableOwnerCol">Vector3D</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#y">y</a> : Number<div class="summaryTableDescription">
   The y-coordinate of the vector
   </div>
</td><td class="summaryTableOwnerCol">Vector3D</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#z">z</a> : Number<div class="summaryTableDescription">
   The z-coordinate of the vector
   </div>
</td><td class="summaryTableOwnerCol">Vector3D</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#Vector3D()">Vector3D</a>(x:Number = 0, y:Number = 0, z:Number = 0, w:Number = 0)</div>
<div class="summaryTableDescription">
   Creates a new Vector3D object.</div>
</td><td class="summaryTableOwnerCol">Vector3D</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#add()">add</a>(a:<a href="Vector3D.html">Vector3D</a>):<a href="../math/Vector3D.html">Vector3D</a>
</div>
<div class="summaryTableDescription">
   Adds a vector to the current vector, and returns the result as new instance.</div>
</td><td class="summaryTableOwnerCol">Vector3D</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#angleBetween()">angleBetween</a>(a:<a href="Vector3D.html">Vector3D</a>):Number</div>
<div class="summaryTableDescription">
   Calculates the angle between two vectors.</div>
</td><td class="summaryTableOwnerCol">Vector3D</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#clone()">clone</a>():<a href="../math/Vector3D.html">Vector3D</a>
</div>
<div class="summaryTableDescription">
   Creates a new vector that is an exact duplicate of the current.</div>
</td><td class="summaryTableOwnerCol">Vector3D</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#crossProduct()">crossProduct</a>(a:<a href="Vector3D.html">Vector3D</a>):<a href="../math/Vector3D.html">Vector3D</a>
</div>
<div class="summaryTableDescription">
   Calculates the cross product of two vectors
   
   </div>
</td><td class="summaryTableOwnerCol">Vector3D</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#decrementBy()">decrementBy</a>(a:<a href="Vector3D.html">Vector3D</a>):void</div>
<div class="summaryTableDescription">
   Deducts a vector from the current one.</div>
</td><td class="summaryTableOwnerCol">Vector3D</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#distance()">distance</a>(a:<a href="Vector3D.html">Vector3D</a>, b:<a href="Vector3D.html">Vector3D</a>):Number</div>
<div class="summaryTableDescription">[static]
   Calculates the distance between two points.</div>
</td><td class="summaryTableOwnerCol">Vector3D</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#dotProduct()">dotProduct</a>(a:<a href="Vector3D.html">Vector3D</a>):Number</div>
<div class="summaryTableDescription">
   Calculates the dot product of two vectors
   
   </div>
</td><td class="summaryTableOwnerCol">Vector3D</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#equals()">equals</a>(toCompare:<a href="Vector3D.html">Vector3D</a>, allFour:Boolean = false):Boolean</div>
<div class="summaryTableDescription">
   Compares two vectors to see if they are equal.</div>
</td><td class="summaryTableOwnerCol">Vector3D</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#incrementBy()">incrementBy</a>(a:<a href="Vector3D.html">Vector3D</a>):void</div>
<div class="summaryTableDescription">
   Adds a vector to the current vector.</div>
</td><td class="summaryTableOwnerCol">Vector3D</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#multiplyMatrix()">multiplyMatrix</a>(m:<a href="Matrix3D.html">Matrix3D</a>):void</div>
<div class="summaryTableDescription">
   Multiplies this vector with a matrix;
   </div>
</td><td class="summaryTableOwnerCol">Vector3D</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#nearEquals()">nearEquals</a>(toCompare:<a href="Vector3D.html">Vector3D</a>, tolerance:Number = 0.0001, allFour:Boolean = false):Boolean</div>
<div class="summaryTableDescription">
   Compares two vectors to see if they are equal within a margin of error.</div>
</td><td class="summaryTableOwnerCol">Vector3D</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#negate()">negate</a>():void</div>
<div class="summaryTableDescription">
   Negates the current vector.</div>
</td><td class="summaryTableOwnerCol">Vector3D</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#normalize()">normalize</a>():void</div>
<div class="summaryTableDescription">
   Scales the vector so it becomes unit length.</div>
</td><td class="summaryTableOwnerCol">Vector3D</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#project()">project</a>():void</div>
<div class="summaryTableDescription">
   Divides the x, y and z coordinates by the w-component.</div>
</td><td class="summaryTableOwnerCol">Vector3D</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#scaleBy()">scaleBy</a>(s:Number):void</div>
<div class="summaryTableDescription">
   Multiplies the vector by a scalar value
   </div>
</td><td class="summaryTableOwnerCol">Vector3D</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#subtract()">subtract</a>(a:<a href="Vector3D.html">Vector3D</a>):<a href="../math/Vector3D.html">Vector3D</a>
</div>
<div class="summaryTableDescription">
   Deducts two vectors and returns the result as a new vector.</div>
</td><td class="summaryTableOwnerCol">Vector3D</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#toString()">toString</a>():String</div>
<div class="summaryTableDescription">
   Generates a string representation of the coordinates of the vector.</div>
</td><td class="summaryTableOwnerCol">Vector3D</td>
</tr>
</table>
</div>
<a name="constantSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Constants</div>
<table id="summaryTableConstant" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Constant</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#XAXIS">XAXIS</a> : <a href="../math/Vector3D.html">Vector3D</a>
<div class="summaryTableDescription">[static]
   The absolute x-axis
   </div>
</td><td class="summaryTableOwnerCol">Vector3D</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#YAXIS">YAXIS</a> : <a href="../math/Vector3D.html">Vector3D</a>
<div class="summaryTableDescription">[static]
   The absolute y-axis
   </div>
</td><td class="summaryTableOwnerCol">Vector3D</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#ZAXIS">ZAXIS</a> : <a href="../math/Vector3D.html">Vector3D</a>
<div class="summaryTableDescription">[static]
   The absolute z-axis
   </div>
</td><td class="summaryTableOwnerCol">Vector3D</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="length"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">length</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>length:Number</code>&nbsp;&nbsp;[read-only]<p>
   The length of the vector, or the distance from a point to the origin.
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get length():Number</code>
<br>
</div>
<a name="lengthSquared"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">lengthSquared</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>lengthSquared:Number</code>&nbsp;&nbsp;[read-only]<p>
   The squared length of the vector, or the squared distance from a point to the origin.
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get lengthSquared():Number</code>
<br>
</div>
<a name="w"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">w</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var w:Number</code><p>
   A number defining whether the vector is a direction vector (0) or a point (1). Points are translated, whereas Vectors aren't.
   </p></div>
<a name="x"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">x</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var x:Number</code><p>
   The x-coordinate of the vector
   </p></div>
<a name="y"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">y</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var y:Number</code><p>
   The y-coordinate of the vector
   </p></div>
<a name="z"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">z</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var z:Number</code><p>
   The z-coordinate of the vector
   </p></div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="Vector3D()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">Vector3D</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function Vector3D(x:Number = 0, y:Number = 0, z:Number = 0, w:Number = 0)</code><p>
   Creates a new Vector3D object.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">x</span>:Number</code> (default = <code>0</code>)<code></code> &mdash; The x-coordinate of the vector
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">y</span>:Number</code> (default = <code>0</code>)<code></code> &mdash; The y-coordinate of the vector
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">z</span>:Number</code> (default = <code>0</code>)<code></code> &mdash; The z-coordinate of the vector
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">w</span>:Number</code> (default = <code>0</code>)<code></code> &mdash; A number defining whether the vector is a direction vector (0) or a point (1)
   </td>
</tr>
</table>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="add()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">add</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function add(a:<a href="Vector3D.html">Vector3D</a>):<a href="../math/Vector3D.html">Vector3D</a></code><p>
   Adds a vector to the current vector, and returns the result as new instance.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">a</span>:<a href="Vector3D.html">Vector3D</a></code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../math/Vector3D.html">Vector3D</a></code> &mdash; 
                        The sum of two vectors.
   
                        
                     </td>
</tr>
</table>
</div>
<a name="angleBetween()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">angleBetween</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function angleBetween(a:<a href="Vector3D.html">Vector3D</a>):Number</code><p>
   Calculates the angle between two vectors.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">a</span>:<a href="Vector3D.html">Vector3D</a></code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Number</code> &mdash; The angle between two vectors.
   </td>
</tr>
</table>
</div>
<a name="clone()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">clone</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function clone():<a href="../math/Vector3D.html">Vector3D</a></code><p>
   Creates a new vector that is an exact duplicate of the current.
   
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../math/Vector3D.html">Vector3D</a></code> &mdash; 
                        A clone of the current vector.
   
                        
                     </td>
</tr>
</table>
</div>
<a name="crossProduct()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">crossProduct</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function crossProduct(a:<a href="Vector3D.html">Vector3D</a>):<a href="../math/Vector3D.html">Vector3D</a></code><p>
   Calculates the cross product of two vectors
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">a</span>:<a href="Vector3D.html">Vector3D</a></code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../math/Vector3D.html">Vector3D</a></code> &mdash; 
                        The cross product of two vectors.
   
                        
                     </td>
</tr>
</table>
</div>
<a name="decrementBy()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">decrementBy</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function decrementBy(a:<a href="Vector3D.html">Vector3D</a>):void</code><p>
   Deducts a vector from the current one.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">a</span>:<a href="Vector3D.html">Vector3D</a></code></td>
</tr>
</table>
</div>
<a name="distance()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">distance</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function distance(a:<a href="Vector3D.html">Vector3D</a>, b:<a href="Vector3D.html">Vector3D</a>):Number</code><p>
   Calculates the distance between two points.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">a</span>:<a href="Vector3D.html">Vector3D</a></code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">b</span>:<a href="Vector3D.html">Vector3D</a></code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Number</code></td>
</tr>
</table>
</div>
<a name="dotProduct()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">dotProduct</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function dotProduct(a:<a href="Vector3D.html">Vector3D</a>):Number</code><p>
   Calculates the dot product of two vectors
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">a</span>:<a href="Vector3D.html">Vector3D</a></code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Number</code> &mdash; The dot product of two vectors.
   </td>
</tr>
</table>
</div>
<a name="equals()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">equals</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function equals(toCompare:<a href="Vector3D.html">Vector3D</a>, allFour:Boolean = false):Boolean</code><p>
   Compares two vectors to see if they are equal.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">toCompare</span>:<a href="Vector3D.html">Vector3D</a></code> &mdash; The vector to compare with the current.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">allFour</span>:Boolean</code> (default = <code>false</code>)<code></code> &mdash; Defines if the w-coordinate should be used in the comparison.
   
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; Whether or not the vectors are equal.
   </td>
</tr>
</table>
</div>
<a name="incrementBy()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">incrementBy</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function incrementBy(a:<a href="Vector3D.html">Vector3D</a>):void</code><p>
   Adds a vector to the current vector.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">a</span>:<a href="Vector3D.html">Vector3D</a></code></td>
</tr>
</table>
</div>
<a name="multiplyMatrix()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">multiplyMatrix</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function multiplyMatrix(m:<a href="Matrix3D.html">Matrix3D</a>):void</code><p>
   Multiplies this vector with a matrix;
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">m</span>:<a href="Matrix3D.html">Matrix3D</a></code></td>
</tr>
</table>
</div>
<a name="nearEquals()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">nearEquals</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function nearEquals(toCompare:<a href="Vector3D.html">Vector3D</a>, tolerance:Number = 0.0001, allFour:Boolean = false):Boolean</code><p>
   Compares two vectors to see if they are equal within a margin of error.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">toCompare</span>:<a href="Vector3D.html">Vector3D</a></code> &mdash; The vector to compare with the current.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">tolerance</span>:Number</code> (default = <code>0.0001</code>)<code></code> &mdash; The maximum difference that each component is allowed to have to be considered equal.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">allFour</span>:Boolean</code> (default = <code>false</code>)<code></code> &mdash; Defines if the w-coordinate should be used in the comparison.
   
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; Whether or not the vectors are quasi equal.
   </td>
</tr>
</table>
</div>
<a name="negate()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">negate</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function negate():void</code><p>
   Negates the current vector.
   </p></div>
<a name="normalize()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">normalize</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function normalize():void</code><p>
   Scales the vector so it becomes unit length.
   </p></div>
<a name="project()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">project</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function project():void</code><p>
   Divides the x, y and z coordinates by the w-component.
   </p></div>
<a name="scaleBy()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">scaleBy</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function scaleBy(s:Number):void</code><p>
   Multiplies the vector by a scalar value
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">s</span>:Number</code></td>
</tr>
</table>
</div>
<a name="subtract()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">subtract</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function subtract(a:<a href="Vector3D.html">Vector3D</a>):<a href="../math/Vector3D.html">Vector3D</a></code><p>
   Deducts two vectors and returns the result as a new vector.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">a</span>:<a href="Vector3D.html">Vector3D</a></code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../math/Vector3D.html">Vector3D</a></code> &mdash; 
                        The difference between to vectors.
   
                        
                     </td>
</tr>
</table>
</div>
<a name="toString()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">toString</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function toString():String</code><p>
   Generates a string representation of the coordinates of the vector.
   
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>String</code> &mdash; A String representation of the vector.
   </td>
</tr>
</table>
</div>
<a name="constantDetail"></a>
<div class="detailSectionHeader">Constant detail</div>
<a name="XAXIS"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">XAXIS</td><td class="detailHeaderType">constant</td>
</tr>
</table>
<div class="detailBody">
<code>public static const XAXIS:<a href="../math/Vector3D.html">Vector3D</a></code><p>
   The absolute x-axis
   </p></div>
<a name="YAXIS"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">YAXIS</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static const YAXIS:<a href="../math/Vector3D.html">Vector3D</a></code><p>
   The absolute y-axis
   </p></div>
<a name="ZAXIS"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">ZAXIS</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static const ZAXIS:<a href="../math/Vector3D.html">Vector3D</a></code><p>
   The absolute z-axis
   </p></div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
